package cn.dengta.webapp.user.entity.task;

import lombok.Getter;
import lombok.Setter;
import me.codeplayer.util.Assert;

/**
 * 用户资料补充的规则配置对象
 */
@Getter
@Setter
public class InfoSupplyConfig implements RuleConfig {

	private static final long serialVersionUID = 1L;
	//
	protected Integer limitScore;

	@Override
	public void validate() {
		Assert.isTrue(limitScore != null && limitScore > 0, "资料进度不能为空！");
	}

	@Override
	public void init(RuleConfig config) {
		InfoSupplyConfig cfg = (InfoSupplyConfig) config;
		this.limitScore = cfg.limitScore;
	}

}
